<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%@ page import ="java.sql.*" %>

<%@ page import ="javax.sql.*" %>
<%@ page import="paq.ValidarReserva" %>

<%
String saltoLinea = System.getProperty("line.separator");

String databaseName = "grupo_1_db";

Class.forName("com.mysql.jdbc.Driver"); 
java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/" + databaseName,"root","ignacio"); 
Statement st1= con.createStatement(); 
Statement st2= con.createStatement(); 
Statement st3= con.createStatement(); 
ResultSet rs=st1.executeQuery("select id,usuario from clientes"); 
ResultSet rpq=st2.executeQuery("select * from paquetes_viajes"); 





ResultSet rvl=st3.executeQuery("select idvuelo,descripcion from vuelos"); 



%>




<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Modificando Reserva Nro ${idreserva}
</title>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	left:20px;
	top:20px;
	width:635px;
	height:539px;
	z-index:1;
	right: auto;
}
#apDiv2 {
	position:absolute;
	left:136px;
	top:95px;
	width:573px;
	height:49px;
	z-index:2;
	
}
#apDiv3 {
	position:absolute;
	left:136px;
	top:171px;
	width:575px;
	height:257px;
	z-index:3;
	background-image: url(images/tpwebbg2.png);
}
body {
	background-color: #CCCCCC;
}
.Estilo1 {color: #FF0000;
font-size:18px;}
-->
</style>
</head>
<body>

<div id="apDiv1">
<div id="apDiv2">
  <div align="center" class="Estilo1"><img src="images/tpmodificar.png"><!-- Generar Reserva --></div>
</div>
<div id="apDiv3">
  <table width="100%" border="0" align="center">
  <tr>
      <td>&nbsp;</td>
      <td>Modificando Nro. de Reserva: <font color="red"><b>${idreserva}</b></font></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>    
    <tr>
      <td>&nbsp;</td>
      <td>Cambiar Paquete </td>
      
         <form id="form1" name="form1" method="post" action="Modificar">
       
      <td>
      <input type="hidden" value="${idreserva}" id="idReservaC" name="idReservaC">
      <select name="paquetelist" id="paquetelist">
      
     
      
      
      <% 
			while(rpq.next()) 
			{ 	
				out.println("<option value='"+rpq.getString(1)+"'>"+rpq.getString(4)+"</option>"); 
				
				
			} 

		%>
      
   
      
      
      </select></td>
      <td>&nbsp;</td>
    </tr>
       
    
       
    
    
    <tr>
      <td>&nbsp;</td>
      <td>Cambiar Vuelo</td>
      <td><select name="vueloasignado" id="vueloasignado">
       <% 
      		while(rvl.next()) 
			{ 	
				out.println("<option value='"+rvl.getString(1)+"'>"+rvl.getString(2)+"</option>"); 
				
				
			} 

		%>
      </select></td>
      <td>&nbsp;</td>
    </tr>    
    
    <tr>
      <td>&nbsp;</td>
      <td>
       
      </td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="2">
        <center>
        
        
        <input type="submit" name="envairreserva" id="envairreserva" value="Guardar Cambios en la Reserva" />
        <input type="button" onclick='location.href="Modificar.jsp"' value='Volver'/>
        </center>
      </form>
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
</div>







</body>
</html>

<% con.close(); %>